// 权限相关类型

// 系统权限
export interface SysPermission {
  permissionId: number
  parentId: number
  permissionName: string
  permissionKey: string
  permissionType: PermissionType
  status: number
  isHidden?: boolean
  path?: string
  component?: string
  icon?: string
  sortOrder?: number
  remark: string
  createTime: Date
  updateTime: Date
  children?: SysPermission[] // 子权限
}

// 权限类型枚举
export enum PermissionType {
  MENU = 1, // 目录
  MENU_ITEM = 2, // 菜单
  BUTTON = 3 // 按钮
}

// 权限状态枚举
export enum PermissionStatus {
  DISABLE = 0, // 关闭
  ENABLE = 1 // 开启
}

// 权限树节点
export interface PermissionTreeNode extends SysPermission {
  children?: PermissionTreeNode[]
  isLeaf?: boolean
  title?: string
  key?: number | string
}
